Skip to content

Improve generation of reference docs#30

Open
adamwg wants to merge 5 commits into
crossplane:mainfrom
adamwg:awg/improve-docs
Open

Improve generation of reference docs#30
adamwg wants to merge 5 commits into
crossplane:mainfrom
adamwg:awg/improve-docs

Conversation

@adamwg
Copy link
Copy Markdown
Member

@adamwg adamwg commented May 22, 2026

Description of your changes

The crossplane/docs repository uses the vale tool to lint prose. It's a overzealous sometimes, but overall helpful, and currently complains about a ton of issues in our help text.

Fix all the issues, using a special spell check (to be introduced in the docs repo) to avoid complaints about lower-case crossplane, since it's the command name, and a new novale kong tag to disable specific checks where we can't fix them otherwise (e.g., when the command name is a forbidden word).

To address some of the vale issues, and make the output look better, format our maturity level banners using markdown. Omit the feature enablement notice in the top-level help when we generate docs, since it's not interesting on the docs website.

While we're here, introduce a CI check that generates the docs and runs the docs repo's vale check on them. This will probably fail until crossplane/docs#1097 is merged since it makes a necessary update to the vale configuration.

Fixes #32

I have:

Format our maturity level banners using markdown so that they look better in
rendered help and generated docs. Omit the feature enablement notice in the
top-level help when we generate docs, since it's not interesting on the docs
website.

Signed-off-by: Adam Wolfe Gordon <awg@upbound.io>
@adamwg adamwg requested review from a team, jcogilvie and tampakrap as code owners May 22, 2026 23:09
@adamwg adamwg requested review from bobh66 and removed request for a team May 22, 2026 23:09
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 22, 2026

Review Change Stack

Warning

Review limit reached

@adamwg, we couldn't start this review because you've reached your PR review rate limit.

More reviews will be available in 16 minutes and 13 seconds. Learn how PR review limits work.

Your organization has run out of usage credits. Purchase more in the billing tab.

⌛ How to resolve this issue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans include higher PR review limits than trial, open-source, and free plans. In all cases, reviews become available again over time. During sustained high-volume PR review activity, CodeRabbit may temporarily slow when the next review becomes available.

Please see our Fair Usage Limits Policy for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 881e18fa-3506-46e7-b9e0-68ad15a56675

📥 Commits

Reviewing files that changed from the base of the PR and between df51062 and 7b7abcc.

📒 Files selected for processing (1)
  • .github/workflows/ci.yml
📝 Walkthrough

Walkthrough

This PR refines CLI help tags and many help markdown files, improves docs generation (novale parsing, closing Hugo blocks, Markdown note banners), embeds xrd convert help, and adds a CI job to validate generated docs. Changes are documentation/metadata only except CI and docs-gen plumbing.

Changes

CLI Help Text and Documentation Refinement

Layer / File(s) Summary
Help generation and feature flag output
cmd/crossplane/docs.go, internal/maturity/maturity.go
Docs generator records per-command novale tags, filters the “Alpha and beta features are enabled.” sentinel, closes unterminated Hugo hint/table blocks, and formats feature-flag notes as Markdown blockquotes (> **Note:** ...).
Main CLI and configuration commands
cmd/crossplane/main.go, cmd/crossplane/config/config.go, cmd/crossplane/config/help/config.md, cmd/crossplane/config/set.go
Top-level config help wording and --config flag updated to use “configuration file”; config set/view help text clarified and novale tags added to subcommands.
Project management commands
cmd/crossplane/project/help/build.md, cmd/crossplane/project/help/init.md, cmd/crossplane/project/help/push.md, cmd/crossplane/project/help/run.md, cmd/crossplane/project/help/stop.md, cmd/crossplane/project/push.go, cmd/crossplane/project/run.go, cmd/crossplane/project/project.go
Reworded project command docs and a few flag tags (Tag default, ClusterAdmin wording, registry-dir guidance) to clarify .xpkg output, control-plane naming, registry credentials, and cleanup behavior.
Composition, dependency, and conversion commands
cmd/crossplane/composition/generate.go, cmd/crossplane/composition/help/generate.md, cmd/crossplane/dependency/add.go, cmd/crossplane/dependency/dependency.go, cmd/crossplane/dependency/help/*, cmd/crossplane/convert/*, cmd/crossplane/function/help/generate.md
Updated composition generate help wording, refined dependency add/update-cache docs and novale tags, clarified composition-environment conversion messaging, and minor CLI help wording edits.
Composition and operation rendering
cmd/crossplane/render/engine.go, cmd/crossplane/render/op/cmd.go, cmd/crossplane/render/op/help/render.md, cmd/crossplane/render/xr/cmd.go, cmd/crossplane/render/xr/help/render.md
Engine flags and render op/xr help revised for clarity; function runtime configuration moved into a dedicated section with updated Docker behavior and annotation formatting.
Validation and monitoring commands
cmd/crossplane/validate/cmd.go, cmd/crossplane/validate/help/validate.md, cmd/crossplane/top/help/top.md, cmd/crossplane/trace/help/trace.md, cmd/crossplane/trace/trace.go
Validate help clarifies schema/cache and CEL heading, trace help reflows examples and output guidance, and top help uses “resource usage.”
XPackage management commands
cmd/crossplane/xpkg/*, cmd/crossplane/xpkg/help/*
Rewords xpkg command flags and docs (build, batch, extract, init, install, push, update, overview), documents --ignore as comma-separated globs, and clarifies registry credential and reference requirements.
XRD conversion and generation
cmd/crossplane/xrd/convert.go, cmd/crossplane/xrd/help/convert.md, cmd/crossplane/xrd/generate.go, cmd/crossplane/xrd/help/generate.md
xrd convert help is embedded via go:embed; convert/generate help and CLI metadata updated for stdin/stdout defaults and output-path/plural wording.
CI docs validation job
.github/workflows/ci.yml
Adds validate-docs job to regenerate CLI reference and run Vale against it.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~12 minutes

Possibly related PRs

  • crossplane/cli#12: Related work touching cmd/crossplane/xrd/convert.go and help embedding.
  • crossplane/cli#10: Related to composition generate command surface that receives wording refinements here.
  • crossplane/cli#14: Related command-doc generation changes overlapping cmd/crossplane/docs.go normalization and novale handling.

Suggested reviewers

  • jcogilvie
  • tampakrap
  • bobh66

Thank you for the clear, focused edits — the doc and help-generation plumbing changes look straightforward to review.


Important

Pre-merge checks failed

Please resolve all errors before merging. Addressing warnings is optional.

❌ Failed checks (1 error)

Check name Status Explanation Resolution
Breaking Changes ❌ Error cmd/crossplane/xrd/convert.go InputFile now defaults to stdin (default:"-") causing behavior change without 'breaking-change' label per review comment. Add 'breaking-change' label to PR or revert default:"-" from InputFile to preserve backward compatibility.
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title 'Improve generation of reference docs' is directly related to the main objective of this PR, which is to improve documentation generation and fix vale linting issues.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Feature Gate Requirement ✅ Passed PR adds no new experimental features affecting APIs or behavior. Changes are documentation/help text updates for Vale linting compliance and markdown formatting improvements only.
Description check ✅ Passed The PR description clearly explains the purpose of changes: fixing vale prose linting issues in help text and generated docs, with specific techniques mentioned (novale tags, markdown formatting).

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 6

🧹 Nitpick comments (2)
cmd/crossplane/xrd/generate.go (1)

53-53: ⚡ Quick win

Clarify what --path is relative to

Could we keep a bit more context in the help text here?
On Line 53, Output path. is pretty terse and doesn’t tell users this is within the project APIs layout.

Suggested wording
-	Path        string `help:"Output path."                    optional:""`
+	Path        string `help:"Output path within the project's APIs directory." optional:""`

As per coding guidelines: "**/cmd/**: Review CLI commands for proper flag handling, help text, and error messages. Ensure commands follow Crossplane CLI conventions."

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@cmd/crossplane/xrd/generate.go` at line 53, The help text for the Path flag
(struct field Path in generate.go) is too terse; update its `help` string to
clearly state that the provided output path is relative to the project root and
should point into the APIs layout (e.g., under the project's api/ or apis/
directory), e.g. "Output path relative to project root (destination within
project APIs layout, e.g. api/ or apis/)." Ensure you only change the
`help:"..."` value for the Path field.
cmd/crossplane/function/help/generate.md (1)

2-3: 💤 Low value

Consider whether "idempotently" is clear for all users.

The term "idempotently" is technically precise but may not be familiar to all CLI users. Since this help text falls under cmd/**, the coding guidelines emphasize user-friendliness and avoiding internal technical details.

Would simpler phrasing like "adds the new function to the end of a Composition's pipeline (if not already present)" or "safely adds the new function" be clearer while still conveying the behavior?

That said, if "idempotently" is intentional and aligns with Crossplane terminology conventions, it's fine to keep—just wanted to check!

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@cmd/crossplane/function/help/generate.md` around lines 2 - 3, The help text
uses the term "idempotently" which may be unclear to some users; replace that
word in the generate help text where it says "idempotently adds the new function
to end of a Composition's pipeline" with clearer wording such as "adds the new
function to the end of a Composition's pipeline (if not already present)" or
"safely adds the new function to the end of a Composition's pipeline" so the
behavior is explicit and user-friendly.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@cmd/crossplane/docs.go`:
- Around line 237-242: The code currently closes the "hint" shortcode at EOF
using the bq flag but forgets to close an open table shortcode; update the EOF
handling in the same function that builds sb (where bq is used) to also check
the table-open flag (e.g., bt) and, if true, append the table close token "{{<
/table >}}\n" to sb before returning strings.TrimSpace(sb.String()), so any
trailing table row is properly terminated.

In `@cmd/crossplane/function/help/generate.md`:
- Line 3: Edit the sentence "adds the new function to end of a Composition's
pipeline when given a" to insert the missing article so it reads "adds the new
function to the end of a Composition's pipeline when given a" to correct the
grammar.

In `@cmd/crossplane/project/help/build.md`:
- Line 8: The Markdown text contains an extra space inside the inline code
backticks for the build command; locate the literal token "`build `" in the help
text (the sentence starting "The `build `command constructs...") and remove the
trailing space so it reads "`build`" (i.e., replace "`build `" with "`build`")
to fix the formatting.
- Line 5: Fix the typo in the project help text: replace the misspelled word
"packges" with "packages" in the sentence that mentions the `project push`
command (the line containing "The `project push` command can consume packges
from the"). Ensure only the spelling is corrected and punctuation/formatting
remains unchanged.

In `@cmd/crossplane/project/help/stop.md`:
- Line 8: Replace the incorrect command references 'up project run' and 'up
project stop' in the stop.md content with the correct commands 'crossplane
project run' and 'crossplane project stop' so the README/documentation
accurately reflects the CLI; locate the offending strings (e.g., "passed
`--registry-dir` to `up project run`, pass it to `up project stop` as") and
update them to use "crossplane project run" and "crossplane project stop".

In `@cmd/crossplane/trace/help/trace.md`:
- Around line 35-37: Fix the typo in the help text: change the phrase
"graph.Pipe to `dot` to" so there is a space after the period (i.e., "graph.
Pipe to `dot` to") in the string containing "Use `--output=dot` to print a
textual [Graphviz dot](https://graphviz.org/docs/layouts/dot/) graph.Pipe to
`dot` to render an image"; update that literal so the sentence separation is
correct.

---

Nitpick comments:
In `@cmd/crossplane/function/help/generate.md`:
- Around line 2-3: The help text uses the term "idempotently" which may be
unclear to some users; replace that word in the generate help text where it says
"idempotently adds the new function to end of a Composition's pipeline" with
clearer wording such as "adds the new function to the end of a Composition's
pipeline (if not already present)" or "safely adds the new function to the end
of a Composition's pipeline" so the behavior is explicit and user-friendly.

In `@cmd/crossplane/xrd/generate.go`:
- Line 53: The help text for the Path flag (struct field Path in generate.go) is
too terse; update its `help` string to clearly state that the provided output
path is relative to the project root and should point into the APIs layout
(e.g., under the project's api/ or apis/ directory), e.g. "Output path relative
to project root (destination within project APIs layout, e.g. api/ or apis/)."
Ensure you only change the `help:"..."` value for the Path field.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 397ae2e7-ea18-4121-bbb4-d3881e7e4f95

📥 Commits

Reviewing files that changed from the base of the PR and between 79d1b84 and 890c04b.

⛔ Files ignored due to path filters (1)
  • cmd/crossplane/docs-templates/command-reference.md.tmpl is excluded by none and included by none
📒 Files selected for processing (48)
  • cmd/crossplane/composition/generate.go
  • cmd/crossplane/composition/help/generate.md
  • cmd/crossplane/config/config.go
  • cmd/crossplane/config/help/config.md
  • cmd/crossplane/config/set.go
  • cmd/crossplane/convert/compositionenvironment/cmd.go
  • cmd/crossplane/convert/compositionenvironment/help/composition-environment.md
  • cmd/crossplane/convert/help/convert.md
  • cmd/crossplane/dependency/add.go
  • cmd/crossplane/dependency/help/add.md
  • cmd/crossplane/dependency/help/update-cache.md
  • cmd/crossplane/docs.go
  • cmd/crossplane/function/help/generate.md
  • cmd/crossplane/main.go
  • cmd/crossplane/project/help/build.md
  • cmd/crossplane/project/help/init.md
  • cmd/crossplane/project/help/push.md
  • cmd/crossplane/project/help/run.md
  • cmd/crossplane/project/help/stop.md
  • cmd/crossplane/project/push.go
  • cmd/crossplane/project/run.go
  • cmd/crossplane/render/engine.go
  • cmd/crossplane/render/op/cmd.go
  • cmd/crossplane/render/op/help/render.md
  • cmd/crossplane/render/xr/cmd.go
  • cmd/crossplane/render/xr/help/render.md
  • cmd/crossplane/top/help/top.md
  • cmd/crossplane/trace/help/trace.md
  • cmd/crossplane/trace/trace.go
  • cmd/crossplane/validate/cmd.go
  • cmd/crossplane/validate/help/validate.md
  • cmd/crossplane/xpkg/batch.go
  • cmd/crossplane/xpkg/build.go
  • cmd/crossplane/xpkg/extract.go
  • cmd/crossplane/xpkg/help/build.md
  • cmd/crossplane/xpkg/help/init.md
  • cmd/crossplane/xpkg/help/install.md
  • cmd/crossplane/xpkg/help/push.md
  • cmd/crossplane/xpkg/help/update.md
  • cmd/crossplane/xpkg/help/xpkg.md
  • cmd/crossplane/xpkg/init.go
  • cmd/crossplane/xpkg/install.go
  • cmd/crossplane/xpkg/update.go
  • cmd/crossplane/xrd/convert.go
  • cmd/crossplane/xrd/generate.go
  • cmd/crossplane/xrd/help/convert.md
  • cmd/crossplane/xrd/help/generate.md
  • internal/maturity/maturity.go

Comment thread cmd/crossplane/docs.go
Comment thread cmd/crossplane/function/help/generate.md Outdated
Comment thread cmd/crossplane/project/help/build.md Outdated
Comment thread cmd/crossplane/project/help/build.md Outdated
Comment thread cmd/crossplane/project/help/stop.md Outdated
Comment thread cmd/crossplane/trace/help/trace.md
adamwg added 2 commits May 25, 2026 11:03
The crossplane/docs repository uses the vale tool to lint prose. It's a little
overzealous sometimes, but overall helpful, and currently complains about a ton
of issues in our help text.

Fix as many issues as possible. Use a special spell check (to be introduced in
the docs repo) to avoid complaints about lower-case `crossplane`, since it's the
command name.

The remaining issues we can't fix are:

- The abbreviation `config` in the `crossplane config` command.
- The abbreviation `k8s` in the flag help for `crossplane dependency add`.
- The abbreviation `admin` in `cluster-admin` in the help for `crossplane
  project run`.

Signed-off-by: Adam Wolfe Gordon <awg@upbound.io>
Fix a few spelling/grammar/typo issues caught by CodeRabbit, and close tables if
the last line of help is a table row.

Signed-off-by: Adam Wolfe Gordon <awg@upbound.io>
@adamwg adamwg force-pushed the awg/improve-docs branch from d9e45ab to 51de2c5 Compare May 25, 2026 17:03
We have a few commands whose basic (non-detail) help causes vale
errors. Specifically:

* `config` is a forbidden word, so `crossplane config` triggers a warning.
* `k8s` is forbidden confuses a few checks, and we use it in the help for
  `crossplane dependency add`.
* `admin` is a forbidden word, but it's necessary to name the `cluster-admin`
  role in the help for `crossplane project run`.

Add the ability to tag commands with `novale:"..."`, causing specific vale rules
to be ignored for that command's section of the help. Introduce these on the
commands named above.

Signed-off-by: Adam Wolfe Gordon <awg@upbound.io>
Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 3

🧹 Nitpick comments (3)
.github/workflows/ci.yml (1)

203-206: ⚡ Quick win

Consider adding checksum validation for the Vale download.

The workflow downloads and executes a Vale binary without verifying its integrity. While the risk is relatively low with a pinned version over HTTPS, adding SHA256 checksum validation would follow security best practices and protect against potential supply-chain attacks or MITM scenarios.

🔐 Proposed enhancement

You can add checksum validation like this:

       - name: Install Vale
         env:
           VALE_VERSION: "3.14.2"
+          VALE_SHA256: "a1b2c3d4e5f6..." # Replace with actual checksum from release page
         run: |
-          wget https://github.com/errata-ai/vale/releases/download/v${{env.VALE_VERSION}}/vale_${{env.VALE_VERSION}}_Linux_64-bit.tar.gz && tar -xvzf vale_${{env.VALE_VERSION}}_Linux_64-bit.tar.gz
+          wget https://github.com/errata-ai/vale/releases/download/v${{env.VALE_VERSION}}/vale_${{env.VALE_VERSION}}_Linux_64-bit.tar.gz
+          echo "${{env.VALE_SHA256}}  vale_${{env.VALE_VERSION}}_Linux_64-bit.tar.gz" | sha256sum -c
+          tar -xvzf vale_${{env.VALE_VERSION}}_Linux_64-bit.tar.gz

The checksum can be found on the Vale releases page.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In @.github/workflows/ci.yml around lines 203 - 206, The "Install Vale" workflow
step currently downloads and extracts the Vale tarball without verifying
integrity; add a SHA256 checksum validation using the VALE_VERSION variable
before extracting: download or define the expected checksum for
vale_${{env.VALE_VERSION}}_Linux_64-bit.tar.gz, verify the downloaded file with
sha256sum (or similar) and fail the job on mismatch, then only tar -xvzf after
successful verification; update the "Install Vale" step to perform the checksum
fetch/verification and ensure the step exits non-zero on verification failure.
cmd/crossplane/docs.go (1)

131-133: ⚡ Quick win

Consider trimming whitespace from individual novale rules.

If a developer writes novale:"rule1, rule2" (with a space after the comma), the split will preserve that leading space in "rule2". This could cause the generated vale comment to have extra whitespace.

🧹 Proposed enhancement
 if n.Tag != nil && n.Tag.Get("novale") != "" {
-	dc.NoVale = strings.Split(n.Tag.Get("novale"), ",")
+	parts := strings.Split(n.Tag.Get("novale"), ",")
+	for i := range parts {
+		parts[i] = strings.TrimSpace(parts[i])
+	}
+	dc.NoVale = parts
 }

Or more concisely using a helper:

 if n.Tag != nil && n.Tag.Get("novale") != "" {
-	dc.NoVale = strings.Split(n.Tag.Get("novale"), ",")
+	dc.NoVale = slices.Map(strings.Split(n.Tag.Get("novale"), ","), strings.TrimSpace)
 }

(Note: slices.Map requires Go 1.24+; if not available, use the loop version)

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@cmd/crossplane/docs.go` around lines 131 - 133, The current assignment to
dc.NoVale uses strings.Split(n.Tag.Get("novale"), ",") which preserves any
surrounding whitespace; update the logic in cmd/crossplane/docs.go where
n.Tag.Get("novale") is read so each entry is trimmed (e.g., map each element
with strings.TrimSpace or use slices.Map + strings.TrimSpace) before assigning
to dc.NoVale; ensure empty strings are preserved/handled consistently as the
original behavior requires.
cmd/crossplane/trace/trace.go (1)

80-80: 💤 Low value

Capitalization consistency check.

The help text for Concurrency is "load concurrency" (lowercase, no period), while all other flag help texts in this struct start with a capital letter and end with a period. Was the lowercase intentional (perhaps to address a specific Vale rule), or would "Load concurrency." be more consistent with the rest of the help text?

Thanks for improving the help text clarity throughout this command! 🎉

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@cmd/crossplane/trace/trace.go` at line 80, The help text for the Concurrency
flag is inconsistent with other flags (it reads "load concurrency" lowercase and
no period); update the struct tag on Concurrency to use sentence-style
capitalization and punctuation (e.g., "Load concurrency.") so it matches the
rest of the flags' help texts; locate the Concurrency field in the trace.go
struct and change the help tag value accordingly.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In @.github/workflows/ci.yml:
- Around line 188-191: The checkout step that uses
actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd to fetch the
crossplane/docs repository should include persist-credentials: false to avoid
persisting the GITHUB_TOKEN to the checked-out repository; update the step that
currently has "uses: actions/checkout@de0fac2e..." and "with: repository:
crossplane/docs" to add a "persist-credentials: false" field under with so the
token is not stored in the local git config during that checkout.
- Line 210: Fix the unmatched double-quote in the Vale invocation: the flag
--config=docs/utils/vale/.vale.ini" has an extra trailing quote causing a shell
syntax error; remove the stray quote (or alternatively add a matching opening
quote so both the --config value and the target path are properly quoted) in the
./vale ... | tee ... command so the --config argument is valid and the
docs/content/master/cli/command-reference.md path is passed correctly.

In `@cmd/crossplane/xrd/convert.go`:
- Line 43: The change made InputFile (the struct field tagged as InputFile in
the convert command) to default to "-" which causes the command to block on
stdin when no arg is provided; add a unit/integration test that invokes the
convert command with no args (indirectly exercising the InputFile default) and
asserts the expected behavior (e.g., reads from provided stdin data and exits)
to cover the no-arg case, and update the command help text in
cmd/crossplane/xrd/help/convert.md to explicitly state that stdin is the default
when no input file is supplied so automation authors are not surprised.

---

Nitpick comments:
In @.github/workflows/ci.yml:
- Around line 203-206: The "Install Vale" workflow step currently downloads and
extracts the Vale tarball without verifying integrity; add a SHA256 checksum
validation using the VALE_VERSION variable before extracting: download or define
the expected checksum for vale_${{env.VALE_VERSION}}_Linux_64-bit.tar.gz, verify
the downloaded file with sha256sum (or similar) and fail the job on mismatch,
then only tar -xvzf after successful verification; update the "Install Vale"
step to perform the checksum fetch/verification and ensure the step exits
non-zero on verification failure.

In `@cmd/crossplane/docs.go`:
- Around line 131-133: The current assignment to dc.NoVale uses
strings.Split(n.Tag.Get("novale"), ",") which preserves any surrounding
whitespace; update the logic in cmd/crossplane/docs.go where n.Tag.Get("novale")
is read so each entry is trimmed (e.g., map each element with strings.TrimSpace
or use slices.Map + strings.TrimSpace) before assigning to dc.NoVale; ensure
empty strings are preserved/handled consistently as the original behavior
requires.

In `@cmd/crossplane/trace/trace.go`:
- Line 80: The help text for the Concurrency flag is inconsistent with other
flags (it reads "load concurrency" lowercase and no period); update the struct
tag on Concurrency to use sentence-style capitalization and punctuation (e.g.,
"Load concurrency.") so it matches the rest of the flags' help texts; locate the
Concurrency field in the trace.go struct and change the help tag value
accordingly.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 4fc03f46-a943-42cb-ba69-0ba00292806f

📥 Commits

Reviewing files that changed from the base of the PR and between d9e45ab and df51062.

⛔ Files ignored due to path filters (1)
  • cmd/crossplane/docs-templates/command-reference.md.tmpl is excluded by none and included by none
📒 Files selected for processing (50)
  • .github/workflows/ci.yml
  • cmd/crossplane/composition/generate.go
  • cmd/crossplane/composition/help/generate.md
  • cmd/crossplane/config/config.go
  • cmd/crossplane/config/help/config.md
  • cmd/crossplane/config/set.go
  • cmd/crossplane/convert/compositionenvironment/cmd.go
  • cmd/crossplane/convert/compositionenvironment/help/composition-environment.md
  • cmd/crossplane/convert/help/convert.md
  • cmd/crossplane/dependency/add.go
  • cmd/crossplane/dependency/dependency.go
  • cmd/crossplane/dependency/help/add.md
  • cmd/crossplane/dependency/help/update-cache.md
  • cmd/crossplane/docs.go
  • cmd/crossplane/function/help/generate.md
  • cmd/crossplane/main.go
  • cmd/crossplane/project/help/build.md
  • cmd/crossplane/project/help/init.md
  • cmd/crossplane/project/help/push.md
  • cmd/crossplane/project/help/run.md
  • cmd/crossplane/project/help/stop.md
  • cmd/crossplane/project/project.go
  • cmd/crossplane/project/push.go
  • cmd/crossplane/project/run.go
  • cmd/crossplane/render/engine.go
  • cmd/crossplane/render/op/cmd.go
  • cmd/crossplane/render/op/help/render.md
  • cmd/crossplane/render/xr/cmd.go
  • cmd/crossplane/render/xr/help/render.md
  • cmd/crossplane/top/help/top.md
  • cmd/crossplane/trace/help/trace.md
  • cmd/crossplane/trace/trace.go
  • cmd/crossplane/validate/cmd.go
  • cmd/crossplane/validate/help/validate.md
  • cmd/crossplane/xpkg/batch.go
  • cmd/crossplane/xpkg/build.go
  • cmd/crossplane/xpkg/extract.go
  • cmd/crossplane/xpkg/help/build.md
  • cmd/crossplane/xpkg/help/init.md
  • cmd/crossplane/xpkg/help/install.md
  • cmd/crossplane/xpkg/help/push.md
  • cmd/crossplane/xpkg/help/update.md
  • cmd/crossplane/xpkg/help/xpkg.md
  • cmd/crossplane/xpkg/init.go
  • cmd/crossplane/xpkg/install.go
  • cmd/crossplane/xpkg/update.go
  • cmd/crossplane/xrd/convert.go
  • cmd/crossplane/xrd/generate.go
  • cmd/crossplane/xrd/help/convert.md
  • cmd/crossplane/xrd/help/generate.md
✅ Files skipped from review due to trivial changes (38)
  • cmd/crossplane/convert/help/convert.md
  • cmd/crossplane/function/help/generate.md
  • cmd/crossplane/convert/compositionenvironment/help/composition-environment.md
  • cmd/crossplane/project/help/stop.md
  • cmd/crossplane/convert/compositionenvironment/cmd.go
  • cmd/crossplane/project/help/init.md
  • cmd/crossplane/config/set.go
  • cmd/crossplane/dependency/help/add.md
  • cmd/crossplane/top/help/top.md
  • cmd/crossplane/composition/generate.go
  • cmd/crossplane/xrd/help/generate.md
  • cmd/crossplane/xpkg/help/push.md
  • cmd/crossplane/validate/cmd.go
  • cmd/crossplane/render/xr/cmd.go
  • cmd/crossplane/xpkg/build.go
  • cmd/crossplane/dependency/add.go
  • cmd/crossplane/xpkg/help/install.md
  • cmd/crossplane/xpkg/extract.go
  • cmd/crossplane/composition/help/generate.md
  • cmd/crossplane/trace/help/trace.md
  • cmd/crossplane/main.go
  • cmd/crossplane/dependency/help/update-cache.md
  • cmd/crossplane/project/help/run.md
  • cmd/crossplane/xpkg/help/update.md
  • cmd/crossplane/xpkg/batch.go
  • cmd/crossplane/project/push.go
  • cmd/crossplane/project/help/push.md
  • cmd/crossplane/render/op/cmd.go
  • cmd/crossplane/config/help/config.md
  • cmd/crossplane/xpkg/help/xpkg.md
  • cmd/crossplane/render/engine.go
  • cmd/crossplane/xpkg/help/build.md
  • cmd/crossplane/xrd/generate.go
  • cmd/crossplane/xrd/help/convert.md
  • cmd/crossplane/xpkg/install.go
  • cmd/crossplane/project/help/build.md
  • cmd/crossplane/validate/help/validate.md
  • cmd/crossplane/xpkg/help/init.md

Comment thread .github/workflows/ci.yml
Comment thread .github/workflows/ci.yml Outdated
Comment thread cmd/crossplane/xrd/convert.go
@adamwg adamwg force-pushed the awg/improve-docs branch from df51062 to 8e5f659 Compare May 25, 2026 22:18
After building the CLI, check out the docs repo, use our freshly built binary to
generate the CLI reference documentation, and validate it using the docs repo's
vale config. This will ensure our generated docs always pass CI when put up for
review in the docs repo.

Fixes crossplane#32

Signed-off-by: Adam Wolfe Gordon <awg@upbound.io>
@adamwg adamwg force-pushed the awg/improve-docs branch from 8e5f659 to 7b7abcc Compare May 25, 2026 22:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Check help documentation with vale in CI

1 participant